package com.neusoft.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.neusoft.base.BaseController;
import com.neusoft.po.LogSave;
import com.neusoft.po.User;
import com.neusoft.service.LogSaveService;
import com.neusoft.utils.Pager;
@Controller
@RequestMapping("/logsave")
public class LogSaveController extends BaseController {
	@Autowired
	LogSaveService log;
	/**
	 * 分页查询 返回list对象(通过对象)
	 * 
	 * @param request
	 * @param response
	 * @return
	 */ 
	@RequestMapping(value = "/listAll")
	public String listAll(LogSave logSave, Model model, HttpServletRequest request, HttpServletResponse response) {
		//分页查询
		String sql = "SELECT * FROM logsave WHERE 1=1 ";

		sql += " ORDER BY ID DESC ";
		Pager<LogSave> pagers = log.findBySqlRerturnEntity(sql);
		//分页查询
 		model.addAttribute("pagers", pagers);
		//存储查询条件
		model.addAttribute("obj", logSave);
		return "log/logsave";
	}

}
